package co.com.inventarios.modelo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * CatvtaproId entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Embeddable
public class CatvtaproId implements java.io.Serializable {

	// Fields

	private String cvpcatalog;
	private String cvpproduct;
	private String cvpunimed;

	// Constructors

	/** default constructor */
	public CatvtaproId() {
	}

	/** full constructor */
	public CatvtaproId(String cvpcatalog, String cvpproduct, String cvpunimed) {
		this.cvpcatalog = cvpcatalog;
		this.cvpproduct = cvpproduct;
		this.cvpunimed = cvpunimed;
	}

	// Property accessors

	@Column(name = "CVPCATALOG", unique = false, nullable = false, insertable = true, updatable = true, length = 5)
	public String getCvpcatalog() {
		return this.cvpcatalog;
	}

	public void setCvpcatalog(String cvpcatalog) {
		this.cvpcatalog = cvpcatalog;
	}

	@Column(name = "CVPPRODUCT", unique = false, nullable = false, insertable = true, updatable = true, length = 15)
	public String getCvpproduct() {
		return this.cvpproduct;
	}

	public void setCvpproduct(String cvpproduct) {
		this.cvpproduct = cvpproduct;
	}

	@Column(name = "CVPUNIMED", unique = false, nullable = false, insertable = true, updatable = true, length = 4)
	public String getCvpunimed() {
		return this.cvpunimed;
	}

	public void setCvpunimed(String cvpunimed) {
		this.cvpunimed = cvpunimed;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof CatvtaproId))
			return false;
		CatvtaproId castOther = (CatvtaproId) other;

		return ((this.getCvpcatalog() == castOther.getCvpcatalog()) || (this
				.getCvpcatalog() != null
				&& castOther.getCvpcatalog() != null && this.getCvpcatalog()
				.equals(castOther.getCvpcatalog())))
				&& ((this.getCvpproduct() == castOther.getCvpproduct()) || (this
						.getCvpproduct() != null
						&& castOther.getCvpproduct() != null && this
						.getCvpproduct().equals(castOther.getCvpproduct())))
				&& ((this.getCvpunimed() == castOther.getCvpunimed()) || (this
						.getCvpunimed() != null
						&& castOther.getCvpunimed() != null && this
						.getCvpunimed().equals(castOther.getCvpunimed())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getCvpcatalog() == null ? 0 : this.getCvpcatalog()
						.hashCode());
		result = 37
				* result
				+ (getCvpproduct() == null ? 0 : this.getCvpproduct()
						.hashCode());
		result = 37 * result
				+ (getCvpunimed() == null ? 0 : this.getCvpunimed().hashCode());
		return result;
	}

}